import request from '@/router/axios';
import { baseUrl } from '@/config/env';

export const listPage = (query) => request({
    url: baseUrl + '/activiti/leave/page',
    method: 'get',
    params: query
});

export const save = (data) => request({
    url: baseUrl + '/activiti/leave/save',
    method: 'post',
    data: data
});

export const update = (data) => request({
    url: baseUrl + '/activiti/leave/update',
    method: 'put',
    data: data
});

export const deleteLeave = (id) => request({
    url: baseUrl + '/activiti/leave/delete/' + id,
    method: 'delete',
});

export const userList = () => request({
    url: baseUrl + '/activiti/task/userList',
    method: 'get',
});

export const submit = (data) => request({
    url: baseUrl + '/activiti/leave/start',
    method: 'post',
    data: data
});
